Table A–7: Format specifiers allowed with TO_CHAR() and
TO_DATE()
|
Format specifier
|
Description
|
Comment
|
|
|
A value with a leading dollar sign. For example: $999.
|
–
|
|
|
A value with a comma in a specified position, but not a thousands separator. For example: 1.000,00.
|
–
|
|
|
A value with a decimal point in a specified position. For example: 99.99.
|
–
|
|
|
A value displaying a leading or trailing zero. For example, 0999 or 9990.
|
–
|
|
|
A set number of significant digits to be displayed. Display leading space if positive, leading minus if negative. Leading zeros are blank, except for a zero value returning a zero for the integer part of the number. For example: 9999.
|
–
|
|
|
Meridian indicator in the native language. With periods.
|
English only.
|
|
|
Meridian indicator in the native language. Without periods.
|
English only.
|
|
|
The century as a two-digit number. Computed as one greater than the first two digits of the four-digit year.
|
Considers 1900 to be in the 20th century, 2000 to be in the 21st century, and so on.
|
|
|
The day of the week as a one-digit number between 1 and 7.
|
–
|
|
|
A value with an NLS_NUMERIC_CHARACTER in the specified position. The default D character is a period (.). For example: 99D9.
|
–
|
|
|
The day of the week in the native language. First letter only in uppercase.
|
English only.
|
|
|
The day of the week in the native language. First letter only in uppercase.
|
English only.
|
|
|
The day of the week in the native language. Entire name in uppercase.
|
English only.
|
|
|
The day of the month as a two-digit number between 01 and 31.
|
–
|
|
|
The day of the year as a three-digit number between 001 and 365.
|
–
|
|
|
The day of the week as a three-character string in the native language.
|
English only.
|
|
|
A value with an NLS_NUMERIC_CHARACER in the specified position. The default G character is a comma (,). For example: 9G999.
|
–
|
|
|
The hour of the day as a two-digit number between 01 and 12.
|
–
|
|
|
The hour of the day as a two-digit number between 01 and 12.
|
Synonym of HH.
|
|
|
The hour of the day as a two-digit number between 00 and 23.
|
–
|
|
|
The Julian day.
|
–
|
|
|
A value with the local currency symbol NLS_CURRENCY in the specified position. The default L character is a dollar sign ($). For example: L999.
|
–
|
|
|
The minute of the hour as a two-digit number between 0 and 59.
|
–
|
|
|
The month as a two-digit number between 01 and 12.
|
–
|
|
|
The first three characters of the name of the month in the native language.
|
English only.
|
|
|
The first nine characters of the name of the month in the native language, right-padded with blanks.
|
English only.
|
|
|
Meridian indicator in the native language. With periods.
|
English only.
|
|
|
Meridian indicator in the native language. Without periods.
|
English only.
|
|
|
The quarter of the year as a single digit between 1 and 4.
|
–
|
|
|
The century as a two-digit number. Computed as one greater than the first two digits of the four-digit year. BC dates are prefixed by “-”.
|
Considers 1900 to be in the 20th century, 2000 to be in the 21st century, and so on.
|
|
|
Seconds as a two-digit number between 00 and 59.
|
–
|
|
|
Seconds past midnight as a number between 0 and 86339.
|
–
|
|
|
Ordinal suffix appended to a number. Replaced by ST, ND, RD, or TH, depending on the last digit of the number.
|
English only.
|
|
|
The week of the month as a single digit between 1 and 5.
|
–
|
|
|
The week of the year as a two-digit number between 01 and 52.
|
–
|
|
|
The year as a single digit.
|
–
|
|
|
The year as a four-digit number. A comma separates the first digit from the other digits.
|
–
|
|
|
The year as a two-digit number.
|
–
|
|
|
The year as a three-digit number.
|
–
|
|
|
The year as a four-digit number.
|
–
|